package Engine.RMI
{
	
	public class RMIProxyObject extends RMIObject
	{
		private var _session:Session;
		private var _timeOut:int;
		
		public function RMIProxyObject()
		{
			this._timeOut = RMIConfig.DefultTimeOut;
		}
		
		public function get session() : Session
		{
			return this._session;
		}
		
		public function bindingSession(session:Session) : void
		{
			this._session = session;
		}
		
		public function set timeOut(timeOut:int) : void
		{
			this._timeOut = timeOut;
		}
		
		public function get timeOut() : int
		{
			return this._timeOut;
		}
		
		public function makeContext(session:Session) : Context
		{
			var context:Context = new Context();
			context._session = session;
			context._connection = session.connection;
			context._timeOut = this._timeOut;
			return context;
		}
		
		public function makeCall(operation:String) : SRMICall
		{
			var call:SRMICall = new SRMICall();
			call.identity = identity;
			call.operation = operation;
			return call;
		}
	}
}
